package com.server.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.server.pojo.Entries;
import com.server.dao.EntriesDao;
import com.server.service.EntriesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 知识百科词条表 服务实现类
 * </p>
 *
 * @author ckick
 * @since 2025-09-20 09:29:27
 */
@Service
public class EntriesServiceImpl extends ServiceImpl<EntriesDao, Entries> implements EntriesService {
    @Autowired
    EntriesDao entriesDao;

    @Override
    public IPage<Entries> getEntriesWithUserAndCategory(Integer page, Integer limit) {
        IPage<Entries> pageWrapper = new Page<>(page, limit);
        return baseMapper.selectEntriesWithUserAndCategory(pageWrapper);
    }
}
